using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics;
using Microsoft.EntityFrameworkCore;

namespace ef_core_2025_learn.Entity;

public class Epic : WorkItem
{
    public DateTime? StartDate { get; set; }
    public DateTime? EndDate { get; set; }
}

public class Issue : WorkItem
{
    /// <summary>
    /// 工作量
    /// </summary>
    public required decimal Effort { get; set; }
}

public class Task : WorkItem
{
    /// <summary>
    /// 活动
    /// </summary>
    public required string Activity { get; set; }

    /// <summary>
    /// 剩余工作
    /// </summary>
    public required decimal RemainingWork { get; set; }
}

public class WorkItem
{
    public int Id { get; set; }

    public int? StateId { get; set; }
    public WorkItemsState? State { get; set; }


    public required string Area { get; set; }

    public required string IterationPath { get; set; }

    /// <summary>
    /// 优先级
    /// </summary>
    public required int Priority { get; set; }


    public IList<Comment> Comments { get; set; }

    public Guid? AuthorId { get; set; }
    public User? Author { get; set; }


    public List<Tag> Tags { get; set; }

    // public List<WorkItemTag> workItemTags { get; set; } = [];

}